//统一管理用户相关得到api
import request from '@/utils/request'
import type { LoginFrom } from './type'
//使用枚举统一url,大写api常量大写
enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/userInfo',
}

//暴露请求函数
export const reqLogin = (data: LoginFrom) => request.post(API.LOGIN_URL, data)
export const reqUserInfo = () => request.get(API.USERINFO_URL)
